chi squared test, p value, stray from normal
mean(Prunus)
## [1] 0.1921359
mean(Brassicaceae)
## [1] 0.1278986
mean(Lamium)
## [1] 0.09972985
mean(Acer)
## [1] 0.1018838
mean(Lonicera)
## [1] 0.07003503
mean(Salix)
## [1] 0.06957033
mean(Prunus_Group_B)
## [1] 0.04282827
mean(Papaver)
## [1] 0.04312855
mean(Cytisus)
## [1] 0.03175761
mean(Trifolium_repens)
## [1] 0.02704338
mean(Aesculus)
## [1] 0.02084907
mean(Pulmonaria_Group)
## [1] 0.01453764
mean(Laburnum)
## [1] 0.01478939
mean(Phacelia)
## [1] 0.01422394
#setting a common numerical value to pull from in the y axis
means <- c(mean(Prunus), mean(Brassicaceae), mean(Lamium), mean(Acer), mean(Lonicera), mean(Salix), mean(Prunus_Group_B), mean(Papaver), mean(Cytisus), mean(Trifolium_repens), mean(Aesculus), mean(Pulmonaria_Group), mean(Laburnum), mean(Phacelia))
#Now using a character vector to pull names of each group on the x-axis
Flower_species <- c("Prunus", "Brassicaceae", "Lamium", "Acer", "Lonicera", "Salix", "Prunus_Group_B", "Papaver", "Cytisus", "Trifolium_repens", "Aesculus", "Pulmonaria_Group", "Laburnum", "Phacelia")
library(RColorBrewer)
coul <- brewer.pal(14, "Set3")
## Warning in brewer.pal(14, "Set3"): n too large, allowed maximum for palette Set3 is 12
## Returning the palette you asked for with that many colors
#This sets rainbow colors for my graph
par(mar=c(8,4,4,1)+.1)
#This changes the margins on my graph, the first one deals with the bottom allowing me to fit all the words onto the chart
barplot(means, ylim = c(0.00, 0.20), names.arg = Flower_species, las = 2, space = 0.05, xlab = " ", ylab = "Pollen Proportion", main = "Pollen Proportion vs. Flower Species", col=coul, cex.axis=0.9)

# las = 2 moves the x-axis labels vertical
Original Chart